%!TEX program = xelatex
\documentclass[t,12pt,aspectratio=169]{beamer} % 16:9 宽屏比例
\usepackage{ctex} % 中文支持
\usepackage{amsmath, amssymb, bm}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{booktabs}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc, positioning, quotes, angles, 3d}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usetheme{Madrid}
\usecolortheme{default}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{setspace}
\onehalfspacing
\setlength{\parskip}{1em}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtobeamertemplate{frametitle}{}{\vspace*{0.3em}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{条形磁铁的磁场：微分方程建模}
\author{五六七}
%\date{2025年9月3日}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

% 封面页
\begin{frame}
  \titlepage
\end{frame}

% 目录页
\begin{frame}{目录}
  \tableofcontents
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{条形磁铁的磁场的数学模型}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[allowframebreaks]{条形磁铁的磁场的数学模型}

\textbf{问题：} 建立描述条形磁铁外部磁力线的常微分方程。

解答：

将条形磁铁近似为两个点磁荷：北极 $+q_m$ 位于 $(a, 0)$, 南极 $-q_m$ 位于 $(-a, 0)$. 

在真空中，在位置 $\vec{r}_0$ 处的点磁荷 $q_m$ 在位置 $\vec{r}$ 处产生的磁场为
$$
\vec{H}(\vec{r}) = \frac{q_m}{4\pi} \frac{\vec{r} - \vec{r}_0}{|\vec{r} - \vec{r}_0|^3}
$$

\begin{figure}[h]
    \centering
    \begin{tikzpicture}[scale=1.5, >=stealth]

        % 定义原点的位置
        \coordinate (O) at (0,0);
        % 定义点磁的位置
        \coordinate (A) at (1,2);
        % 定义观测点的位置
        \coordinate (B) at (3,2.5);
        % 磁力
        \coordinate (C) at (4,2.75);

        % 绘制\vec{r}_0
        \draw[->, -{Stealth[scale=1.2]}, thick] (O) -- (A) node[midway, above left] {$\vec{r}_0$};

        % 绘制\vec{r}_1
        \draw[->, -{Stealth[scale=1.2]}, thick] (O) -- (B) node[midway, below right] {$\vec{r}$};

        % 绘制AB线段
        \draw[dashed] (A) -- (B);

        % 绘制磁力BC
        \draw[->, -{Stealth[scale=1.2]}, thick, purple] (B) -- (C) node[right] {磁场 $\vec{H}$};

        % 标记原点
        \fill[blue] (O) circle (2pt) node[below right] {原点 $O$};

        % 标记点磁A、观测点B
        \fill[purple] (A) circle (2pt) node[above left] {点磁荷 $q_m$};
        \fill[blue] (B) circle (2pt) node[below right] {观测点};

    \end{tikzpicture}
    \caption{点磁的磁场}
    \label{fig:single-magnet-field}
\end{figure}



\begin{figure}[h]
    \centering
    \begin{tikzpicture}[scale=0.9, >=Stealth, thick]

        % 定义点的位置
        \coordinate (O) at (0,0);
        \coordinate (A) at (-3,0);
        \coordinate (B) at (3,0);
        \coordinate (C) at (2,3);
        \coordinate (D) at (-4,0);
        \coordinate (E) at (4,0);
        \coordinate (F) at (0,-1);
        \coordinate (G) at (0,4);

        \coordinate (C1) at (3,3.6);
        \coordinate (C2) at (2.5,1.5);
        \coordinate (C3) at (3.5,2.1);

        % 绘制x轴
        \draw[->, -{Stealth[scale=1.5]}, thick] (D) -- (E) node[right] {$x$};
        % 绘制y轴
        \draw[->, -{Stealth[scale=1.5]}, thick] (F) -- (G) node[above] {$y$};

        % 绘制磁源
        \fill[blue] (A) circle (4pt) node[below] {南极：$(-a,0)$};
        \fill[blue] (B) circle (4pt) node[below] {北极：$(a,0)$};

        % 绘制磁铁
        \draw[blue, thick, line width=4pt] (A) -- (B);

        % 绘制观测点
        \fill[blue] (C) circle (2.5pt) node[above left] {$(x,y)$};

        % 绘制线段
        \draw[thick] (A) -- (C);
        \draw[thick] (B) -- (C);

        %磁力分析
        \draw[->, -{Stealth[scale=1.5]}, thick, purple] (C) -- (C1) node[above] {$H_1$};
        \draw[->, -{Stealth[scale=1.5]}, thick, purple] (C) -- (C2) node[left] {$H_2$};

        %合力
        \draw[dashed] (C1) -- (C3);
        \draw[dashed] (C2) -- (C3);
        \draw[->, -{Stealth[scale=1.5]}, thick, purple] (C) -- (C3) node[below right] {$H$};

    \end{tikzpicture}
    \caption{两个反向点磁荷的磁力的叠加}
    \label{fig:megnetic-field}
\end{figure}



为简单起见，设 $\frac{q_m}{4\pi} = 1$, 则在观测点 $(x,y)$ 的总磁场为
$$
\vec{H}(x,y) = \frac{1}{r_1^3} \vec{r}_1 + \frac{-1}{r_2^3} \vec{r}_2, 
$$
其中
\begin{align*}
\vec{r}_1 &= (x + a, y), \quad r_1 = \sqrt{(x + a)^2 + y^2}, \\
\vec{r}_2 &= (x - a, y), \quad r_2 = \sqrt{(x - a)^2 + y^2}.
\end{align*}

因此总磁场为
$$
\vec{H}(x,y) = \left( \frac{x + a}{r_1^3}, \frac{y}{r_1^3} \right) 
    -  \left( \frac{x - a}{r_2^3}, \frac{y}{r_2^3} \right) =: (U(x,y), V(x,y) ),
$$ 
其中 
\begin{align*}
U(x,y) &= \frac{x + a}{[(x + a)^2 + y^2]^{3/2}} - \frac{x - a}{[(x - a)^2 + y^2]^{3/2}},\\ 
V(x,y) &= \frac{y}{[(x + a)^2 + y^2]^{3/2}} - \frac{y}{[(x - a)^2 + y^2]^{3/2}}.
\end{align*}

磁力线是处处与磁场方向相切的曲线。

设磁力线为 $y = y(x)$，则其切向量为 $(dx, dy)$，应与 $\vec{H} = (H_x, H_y)$ 平行。

因此有
$$
\frac{dy}{dx} 
= \frac{H_y(x,y)}{H_x(x,y)}
= \frac{\dfrac{y}{[(x + a)^2 + y^2]^{3/2}} - \dfrac{y}{[(x - a)^2 + y^2]^{3/2}}}
{\dfrac{x + a}{[(x + a)^2 + y^2]^{3/2}} - \dfrac{x - a}{[(x - a)^2 + y^2]^{3/2}}}
$$

这是一个一阶非线性常微分方程，描述了磁力线的走向。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{可视化：线素场、方向场}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{磁力线的线素场、方向场}

%问题：根据磁力线满足的微分方程，画出磁力线的方向场。
%方向场的箭头方向表示磁场方向，密度反映场强。
%线素场不画方向与长短。

%\begin{figure}[ht]\centering
\begin{center}
\includegraphics [height=0.7\textheight]{pic/magnetic_field.png}
\end{center}
%\caption{磁力线的微分方程的方向场}
%\end{figure}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{总结}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{总结}

\begin{itemize}
    \item 条形磁铁的磁场可建模为两个反向点磁荷的叠加。
    \item 磁力线是与磁场向量相切的曲线，满足一阶ODE：
    $$
    \frac{dy}{dx} = \frac{H_y(x,y)}{H_x(x,y)}
    $$
    \item 该方程无法解析求解，但可通过数值方法或方向场可视化磁力线。
    \item 方向场（线素场）直观展示了磁场的空间分布。
    \item 本模型为理解电磁场、向量场与微分方程的关系提供了经典范例。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{前沿}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{领域新闻}

【从2D“躺平”磁铁到3D“个性”磁铁，强磁场经典布局已过时】

2025年6月，一种新的“紧凑型”永磁体布局方案横空出世，意味着其在不依赖于笨重的普通电磁铁或超导磁体的情况下，依旧能提供更强且更均匀的磁场。那么，在强磁场应用环境下，为什么磁场强度和均匀度同样重要？如今在电磁铁非常普及的阶段，为什么永磁体仍然具有应用的优势？性能更加优越的永磁体设计具有什么新的应用价值？听罗会仟老师精彩解读！

\url{https://www.bilibili.com/video/BV1vdanz7EAr/}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

